package dp.facade;

/**
 * 外部与一个子系统的通信必须通过一个统一的门面对象进行。
 * @author anan
 *
 */
public class Facade {
	ServiceAImpl sa;
    
	ServiceBImpl sb;
    
	ServiceCImpl sc;
    
    public Facade() {
        sa = new ServiceAImpl();
        sb = new ServiceBImpl();
        sc = new ServiceCImpl(); 
    }
    
    public void methodA() {
        sa.methodA();
        sb.methodB();
    }
    
    public void methodB() {
        sb.methodB();
        sc.methodC();
    }
    
    public void methodC() {
        sc.methodC();
        sa.methodA();
    }
}
